package com.wu.framework.upms.rpc;

import com.wu.framework.upms.api.DictionaryApi;
import com.wu.framework.upms.service.DictionaryService;
import com.wu.framework.inner.layer.web.EasyController;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @description: 用户字典服务
 * @author: 吴佳伟
 * @date: 2021/5/21
 */
@EasyController("/api/dictionary")
public class DictionaryRpc implements DictionaryApi {

    private final DictionaryService dictionaryService;

    public DictionaryRpc(DictionaryService dictionaryService) {
        this.dictionaryService = dictionaryService;
    }


    /**
     * @description: 根据指定字典项查询字典值
     * @author: 吴佳伟
     * @date: 2021/5/21
     * @param: null
     * @return:
     */
    @Override
    public Map<String, Map<String, String>> getConvertDataByItems(List<String> convertItems, boolean order) {
        return dictionaryService.getConvertDataByItems(convertItems,order);
    }
}
